package org.streets.eis.ext.analysis.entities;

import java.sql.Date;
import java.sql.Time;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import org.streets.database.annotations.DataDictDef;
import org.streets.eis.component.grid.ColumnType.DateTime;

@Entity
@Table(name="EIS_ANALYSIS_TEST1")
@DataDictDef(category="测试", alias = "测试表1")
public class TestTable1 {

	public TestTable1(){
		this("");
	}
	public TestTable1(String id){
		this.id = id;
	}
	
	@Id
	@DataDictDef(alias = "ID")
	public String id = "";

	@Column
	@DataDictDef(alias = "姓名")
	public String name;
	
	@Column
	@DataDictDef(alias = "代码")
	public String code;
	
	@Column
	@DataDictDef(alias = "备注")
	public String memo;

	@Column
	@DataDictDef(alias = "组织机构")
	public String organid;
	
	
	@Column
	@DataDictDef(alias = "日期字段")
	public Date datefield;
	
	@Column
	@DataDictDef(alias = "日期时间字段")
	public DateTime datetimefield;
	
	@Column
	@DataDictDef(alias = "时间字段")
	public Time timefield;
	
	@Column
	@DataDictDef(alias = "浮点字段")
	public Double doublefield;
	
	@Column
	@DataDictDef(alias = "整形字段")
	public Integer integerfield;
	
	@Column
	@DataDictDef(alias="代码组字段", attr="11", encrypt=false)
	public String codeGroupField;
	
	@Override
	public int hashCode(){
		return id.hashCode();
	}
	
	@Override
	public boolean equals(Object obj){
		return obj!=null&&(obj instanceof TestTable1)&&id.equals(((TestTable1)obj).id);
	}

	
}
